import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import index from '@/components/index'
import goods from '@/components/goods'
import shop from '@/components/shop'
import test from '@/components/test'

// 前台系统
import front from '@/components/front'
import borrow from '@/components/front/borrow/borrow'
import borrowReal from '@/components/front/borrow/borrowReal'
import gathering from '@/components/front/borrow/gathering'
import increaseQuota from '@/components/front/borrow/increaseQuota'
import registry from '@/components/front/borrow/registry'
import login from '@/components/front/borrow/login'
import shibie from '@/components/front/borrow/shibie'



import repayment from '@/components/front/repayment/repayment'
import repaymentReal from '@/components/front/repayment/repaymentReal'

import message from '@/components/front/message/message'
import personal from '@/components/front/personal/personal'
import borrowRecord from '@/components/front/personal/borrowRecord'
import repaymentRecord from '@/components/front/personal/repaymentRecord'
import myQuota from '@/components/front/personal/myQuota'
import myQuotaDetail from '@/components/front/personal/myQuotaDetail'





// 后台系统
import back from '@/components/back'
import employeePage from '@/components/back/employee/employee'
import employee1 from '@/components/back/employee/employee1'
import employee2 from '@/components/back/employee/employee2'
import employee3 from '@/components/back/employee/employee3'
import employeeInsert1 from '@/components/back/employee/employeeInsert1'
import employeeInsert2 from '@/components/back/employee/employeeInsert2'
import employeeInsert3 from '@/components/back/employee/employeeInsert3'
import operators from '@/components/back/operators/operators'



// 资产评估
import assetsappraisal from '@/components/back/assetsappraisal/assetsappraisal'
import borrower from '@/components/back/borrower/borrower'
import borrowerInsert from '@/components/back/borrower/borrowerInsert'
import usermessage from '@/components/back/usermessage/usermessage'
//借款申请
import loanapplication from '@/components/back/loanapplication/loanapplication'
import loanapplication1 from '@/components/back/loanapplication/loanapplication1'
import loanapplication2 from '@/components/back/loanapplication/loanapplication2'
import loanapplication3 from '@/components/back/loanapplication/loanapplication3'


import loanrepayment from '@/components/back/loanrepayment/loanrepayment'
import interestrate from '@/components/back/interestrate/interestrate'




Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },/* {
      path: '/registry',
      name: 'registry',
      component: registry
    },*/ {
      path: '/goods',
      name: 'goods',
      component: goods
    }, {
      path: '/shop',
      name: 'shop',
      component: shop
    },


    // 前台系统
    {
      path: '/front',
      name: 'front',
      component: front,
      redirect: '/borrow',
      children: [
        //借款
        {
          path: '/borrow',
          name:'borrow',
          component: borrow
        },{
          path: '/borrowReal',
          name: 'borrowReal',
          component: borrowReal
        },{
          path: '/gathering',
          name: 'gathering',
          component: gathering
        },{
          path: '/increaseQuota',
          name: 'increaseQuota',
          component: increaseQuota
        },
        {
          path: '/registry',
          name: 'registry',
          component: registry
        },
        {
          path: '/login',
          name: 'login',
          component: login
        },
        {
          path: '/shibie',
          name: 'shibie',
          component: shibie
        },
        //还款
        {
          path: '/repayment',
          name: 'repayment',
          component: repayment
        },{
          path: '/repaymentReal',
          name: 'repaymentReal',
          component: repaymentReal
        },
        //消息
        {
          path: '/message',
          name: 'message',
          component: message
        },

        //个人中心
        {
          path: '/personal',
          name: 'personal',
          component: personal
        },{
          path: '/borrowRecord',
          name: 'borrowRecord',
          component: borrowRecord
        },{
          path: '/repaymentRecord',
          name: 'repaymentRecord',
          component: repaymentRecord
        },{
          path: '/myQuota',
          name: 'myQuota',
          component: myQuota
        },{
          path: '/myQuotaDetail',
          name: 'myQuotaDetail',
          component: myQuotaDetail
        },





      ]
    },
    // 前台系统 End


    // 后台系统
    {
      path: '/back',
      name: 'back',
      component: back,
      redirect: '/employee',
      children: [
        {
          path: '/employee',
          name:'employeeName',
          component: employeePage
        },{
          path: '/employee1',
          name:'employeeName1',
          component: employee1
        },{
          path: '/employee2',
          name:'employeeName2',
          component: employee2
        },{
          path: '/employee3',
          name:'employeeName3',
          component: employee3
        }
        ,{
          path:'/employeeInsert1',
          name:'employeeInsert1Name',
          component:employeeInsert1
        },{
          path:'/employeeInsert2',
          name:'employeeInsert2Name',
          component:employeeInsert2
        },{
          path:'/employeeInsert3',
          name:'employeeInsert3Name',
          component:employeeInsert3
        }, {
          path:'/operators',
          name:'operators',
          component:operators
        },
        {
          path: '/usermessage',
          name: 'usermessage',
          component: usermessage
        },


        // 资产评估
        {
          path:'/assetsappraisal',
          name:'assetsappraisal',
          component:assetsappraisal
        },
        {
          path:'/borrower',
          name:'borrower',
          component:borrower
        },
        {
          path:'/borrowerInsert',
          name:'borrowerInsert',
          component:borrowerInsert
        },
        // 借款申请
        {
          path:'/loanapplication',
          name:'loanapplication',
          component:loanapplication
        },
        {
          path:'/loanapplication1',
          name:'loanapplication1',
          component:loanapplication1
        },
        {
          path:'/loanapplication2',
          name:'loanapplication2',
          component:loanapplication2
        },
        {
          path:'/loanapplication3',
          name:'loanapplication3',
          component:loanapplication3
        },

        {
          path:'/loanrepayment',
          name:'loanrepayment',
          component:loanrepayment
        },
        {
          path:'/interestrate',
          name:'interestrate',
          component:interestrate
        },



      ]
    }
// 后台系统 End


  ]
})
